package com.ruoyi.qms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qms.mapper.MesNonconformityMapper;
import com.ruoyi.qms.domain.MesNonconformity;
import com.ruoyi.qms.service.IMesNonconformityService;

import javax.annotation.Resource;

/**
 * 不合格品Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-10
 */
@Service
public class MesNonconformityServiceImpl implements IMesNonconformityService 
{
    @Resource
    private MesNonconformityMapper mesNonconformityMapper;

    /**
     * 查询不合格品
     * 
     * @param noncUuid 不合格品主键
     * @return 不合格品
     */
    @Override
    public MesNonconformity selectMesNonconformityByNoncUuid(String noncUuid)
    {
        return mesNonconformityMapper.selectMesNonconformityByNoncUuid(noncUuid);
    }

    /**
     * 查询不合格品列表
     * 
     * @param mesNonconformity 不合格品
     * @return 不合格品
     */
    @Override
    public List<MesNonconformity> selectMesNonconformityList(MesNonconformity mesNonconformity)
    {
        return mesNonconformityMapper.selectMesNonconformityList(mesNonconformity);
    }

    /**
     * 新增不合格品
     * 
     * @param mesNonconformity 不合格品
     * @return 结果
     */
    @Override
    public int insertMesNonconformity(MesNonconformity mesNonconformity)
    {
        return mesNonconformityMapper.insertMesNonconformity(mesNonconformity);
    }

    /**
     * 修改不合格品
     * 
     * @param mesNonconformity 不合格品
     * @return 结果
     */
    @Override
    public int updateMesNonconformity(MesNonconformity mesNonconformity)
    {
        return mesNonconformityMapper.updateMesNonconformity(mesNonconformity);
    }

    /**
     * 批量删除不合格品
     * 
     * @param noncUuids 需要删除的不合格品主键
     * @return 结果
     */
    @Override
    public int deleteMesNonconformityByNoncUuids(String[] noncUuids)
    {
        return mesNonconformityMapper.deleteMesNonconformityByNoncUuids(noncUuids);
    }

    /**
     * 删除不合格品信息
     * 
     * @param noncUuid 不合格品主键
     * @return 结果
     */
    @Override
    public int deleteMesNonconformityByNoncUuid(String noncUuid)
    {
        return mesNonconformityMapper.deleteMesNonconformityByNoncUuid(noncUuid);
    }
}
